const express = require("express");
const bodyParser = require("body-parser");
// let userModel = require("./db/index");
let app = express();

app.use(express.static("static")); //加载静态文件
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

// 引入用户路由
let userRouter = require("./routers/userRouter");
app.use("/user", userRouter); //二级路由

let advRouter = require("./routers/advRouter");
app.use("/adv", advRouter);



// 引入 登录的路由
let loginRouter = require("./routers/loginRouter");
app.use(loginRouter);


app.listen(8989);
